<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>角色列表</title>
    <link rel="stylesheet" type="text/css" href="../../js/easyUI/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="../../js/easyUI/themes/icon.css"/>
    <script type="text/javascript" src="../../js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="../../js/easyUI/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../js/easyUI/locale/easyui-lang-zh_CN.js"></script>
    <link rel="stylesheet" type="text/css" href="../../css/query_list.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/query_item.css"/>
    <script type="text/javascript" src="../../js/validatebox.js"></script>
    <style type="text/css">

    </style>
    <script type="text/javascript">
        // 页面加载初始化方法
        $(function () {
            initDataGrid();
        });
        // 数据表格初始化方法
        function initDataGrid() {
            $('#displayTable').datagrid({
                fit:true, //表格自适应
                fitColumns:true, //列自适应
                nowrap:true, //是否换行
                autoRowHeight:false, //自动行高
                striped:true,
                collapsible:true, //是否可折叠
                url:'/system/queryRoles.do',
                sortName:'deptId',
                sortOrder:'asc',
                remoteSort:false,
                idField:'roleId',
                singleSelect:false, //是否单选
                pagination:true, //分页控件
                rownumbers:true, //行号
                scrollbarSize:0,
                loadMsg:"数据加载中.....",
                rowStyler:function (index, row) {
                    if (row.enabled == 0) {
                        return 'color:#748494;';
                    }
                },
                frozenColumns:[
                    [
                        {field:'ck', checkbox:true},
                        {title:'角色ID', field:'roleId', width:80, sortable:true}
                    ]
                ],
                columns:[
                    [
                        {title:'基础信息', colspan:5}
                    ],
                    [
                        {field:'roleName', title:'角色名称', width:100},
                        {field:'deptName', title:'部门', width:80},
                        {field:'deptId', hidden:true},
                        {field:'orderId', title:'排序', width:20, sortable:true},
                        {field:'delTag', title:'删除标志', width:20}
                    ]
                ]
            });
            //设置分页控件
            var p = $('#displayTable').datagrid('getPager');
            $(p).pagination({
                pageSize:10, //每页显示的记录条数，默认为10
                pageList:[10, 20, 30, 40, 50], //可以设置每页记录条数的列表
                beforePageText:'第', //页数文本框前显示的汉字
                afterPageText:'页    共 {pages} 页',
                displayMsg:'当前显示 {from} - {to} 条记录   共 {total} 条记录'
            });
        }
    </script>
</head>
<body>
<!-- 角色列表DIV -->
<table id="displayTable"></table>
</body>
</html>